<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>沟通历史明细 - TMS</title>
    <link rel="stylesheet" href="/view/frame/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/view/frame/static/css/global.css?v=1.0">
    <style>
      body {margin:20px;}
    </style>
  </head>
  <body>
    <form class="layui-form" autocomplete="off">
      <!--start:表格列表-->
      <table class="layui-hide" id="tableList" lay-filter="tbar"></table>
      <!--end:表格列表-->
    </form>
  </body>
  <script type="text/html" id="doarkDateTpl">
      {{new Date(d.doarkDate).format("yyyy-MM")}}
  </script>
  <script charset="utf-8" src="/view/frame/layui/layui.js"></script>
  <script charset="utf-8" src="/view/frame/static/js/jquery.min.js?v=1.0"></script>
  <script charset="utf-8" src="/view/frame/static/js/layui.district.js?v=1.0"></script>
  <script charset="utf-8" src="/view/tms/static/js/tms_tab.js?v=1.0"></script>
  <script charset="utf-8" src="/view/tms/static/js/tms_index.js?v=1219"></script>
  <script charset="utf-8" src="/view/frame/static/js/lang_zh_CN.js?v=1.0"></script>
  
  <script charset="utf-8" src="/view/frame/static/js/errorCodeMap.js"></script>
  <script charset="utf-8" src="/view/frame/static/js/HC.js?v=1.4"></script>
  <script charset="utf-8" src="/view/tms/static/js/validator.js"></script>
  <script charset="utf-8" src="/view/tms/static/js/bizUtil.js"></script>
  
  <script>
  layui.use(['form', 'layer', 'table', 'laydate'], function(){
    var form = layui.form,
        layer = layui.layer,
        table = layui.table,
        laydate = layui.laydate,
        tmsTab = layui.tms_tab,
        $ = layui.jquery;
        

    var $id = $.trim(getUrlParam('id'));
    console.log($id);
    setTableData($id);
    var differenceSumForAll;

    //方法级渲染
    function setTableData(id){
      var $pageSize = 15;
      table.render({
        elem: '#tableList',
        url: '/ucenter/general/finance/handleBills/queryFlowMyDetailBill.shtml?id='+id,
        response: {
          statusCode: 'SUCCESS',
          countName: 'objects.total', //数据总数的字段名称，默认：count
          dataName: 'objects.list'
        },
        request: {
          pageName: 'pageNum', //页码的参数名称，默认：page
          limitName: 'pageSize' //每页数据量的参数名，默认：limit
        },
        cols: [[
          {field:'id', title: '序号', width:80, sort: true, align: 'center'},
          {field:'jobNo', title: '运输作业号', width:200, align: 'center', event: 'setSign', style:'cursor: pointer;color:#51a2f7;'},
          {field:'doarkDate', title: '做柜日期', width:120, align: 'center', templet:'#doarkDateTpl'},
          {field:'', title: '类型', width:100, align: 'center'},
          {field:'', title: 'S/O', width:150, align: 'center'},
          {field:'', title: '柜号', width:150, align: 'center'},
          {field:'', title: '柜型', width:100, align: 'center'},
          {field:'', title: '车牌号', width:100, align: 'center'},
          {field:'transportCost', title: '运费', width:100, align: 'center'},
          {field:'extraCost', title: '异常费', width:100, align: 'center'},
          {field:'invoiceCost', title: '开票费用', width:100, align: 'center'},
          {field:'totalCost', title: '合计', width:100, align: 'center'},
          {field:'receiveCost', title: '实收金额', width:100, align: 'center'},
          {field:'receivedCost', title: '已收金额', width:100, align: 'center'},
          {field:'handleCost', title: '实付金额', width:100, align: 'center'},
          {field:'auditStatus', title: '审核状态', width:100, align: 'center'},
          {field:'auditRemarks', title: '审核备注', width:100, align: 'center'},
          {field:'confirmStatus', title: '核销状态', width:100, align: 'center'},
          {field:'billDate', title: '生成账单时间', width:100, align: 'center'},
          {field:'status', title: '状态', width:100, align: 'center'}
        ]],
        id: 'dataReload',
        // page: true,
        limits: [15, 30, 50, 100],
        limit: $pageSize,
        height: 'full-130',
        even: true,
        done: function(res, curr, count){console.log(res.objects.differenceSumForAll)}
      });
    }


    $(".btn-cancel").on("click",function(){
      parent.layer.close(parent.layer.index);
    });
  });
  </script>
</html>